#include <bits/stdc++.h>
using namespace std;
int main(){
    int n;
    int cnt=1;
    cin>>n;
    for (int i=1;i<=n;i++){
        for (int j=1;j<=n;j++){
            printf("%02d",cnt);
            cnt++;
        }
        cout<<"\n";
    }
    cnt=1;
    for (int i=0;i<=n;i++){
        for (int j=n-1;j>=i;j--){
            cout<<"  ";
        }
        for (int j=0;j<i;j++){
            printf("%02d",cnt);
            cnt++;
        }
        printf("\n");
    }
    return 0;
}